<template>
    <div class="rich-content">
        <div v-if="content" id="content" ref="content" class="detail" v-html="content"></div>
    </div>
</template>

<script>
export default {
    props: {
        content: {
            type: String
        }
    },
    data() {
        return {};
    },
    mounted() {
        const contentEle = document.getElementById("content");
        console.log("文章加载完成", contentEle);
    },

    methods: {}
};
</script>


<style lang="less">
.rich-content {
    .detail {
        width: 100%;

        img {
            max-width: 100%;
            margin: 5px 0;
        }

        a {
            color: #457bb1;
        }

        strong {
            font-weight: 600;
        }
    }
}
</style>